﻿using CCSSolderUI.Common.Domain;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CCSSolderUI
{
    public static class ModelBuilderExtensions
    {
        public static void Seed(this ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<XYZPoint>().HasData(
                new XYZPoint
                {
                    Id = 1,
                    Name = "Init",
                    X = 0,
                    Y = 0,
                    Z = 0
                },
                    new XYZPoint
                    {
                        Id = 2,
                        Name = "ZSafe",
                        X = 0,
                        Y = 0,
                        Z = 0
                    },
                    new XYZPoint
                    {
                        Id = 3,
                        Name = "CalibCamera",
                        X = 0,
                        Y = 0,
                        Z = 0
                    },
                    new XYZPoint
                    {
                        Id = 4,
                        Name = "CalibActual",
                        X = 0,
                        Y = 0,
                        Z = 0
                    }
                );
            modelBuilder.Entity<WorkPoint>().HasData(
                new WorkPoint { Id = 1, Name = "1", X = 1.2, Y = 1.3, Z = 0.4, IsUse = true, PcsOrder = 0, Hand = 0 },
                new WorkPoint { Id = 2, Name = "2", X = 1.2, Y = 1.3, Z = 0.4, IsUse = false, PcsOrder = 1, Hand = 0 }
                );
        }
    }
}
